<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // 所有数字全为真 0为假 所有字符串为真 ''空字符为假  其他都为假
        console.log(Boolean(' ')); // true  这里面有空格
        console.log(Boolean(0)); //false
        console.log(Boolean(NaN)); //false
        console.log(Boolean(null)); //false
        console.log(Boolean(undefined)); //false
        console.log(Boolean('小白 ')); //true
        console.log(Boolean(12)); //true
        
    </script>
</body>
</html>